﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TimeTracker.SqlLiteProvider
{
    public partial class Provider : System.Configuration.Provider.ProviderBase
    {
        protected string ConnectionStringName { get; set; }

        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);

            string databaseFilename = "Log.db3";

            this.ConnectionStringName = config["connectionStringName"].Replace(databaseFilename, System.IO.Path.Combine(Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), databaseFilename));
        }
    }
}
